export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: '登录',
            path: '/user/login',
            component: './user/Login',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/system',
    layout: true,
    routes: [
      {
        path: '/system',
        routes: [
          {
            path: '/system/devise',
            component: './system/devise',
          },
          {
            path: '/system/devise/edit',
            component: './system/devise/edit',
          },
          {
            path: '/system/menu',
            component: './system/Menu',
          },
          {
            path: '/system/test',
            component: './system/test',
          },
          {
            path: '/system/attr',
            component: './system/attr/index',
          },
          {
            path: '/system/attr/values',
            component: './system/attr/values',
          },
          {
            path: '/system/log/logininfor',
            component: './system/log/logininfor',
          },
          {
            path: '/system/sys/config',
            component: './system/sys/config',
          },
          {
            path: '/system/sys/redis',
            component: './system/sys/redis',
          },
          {
            path: '/system/poster/index',
            component: './system/poster/index',
          },
          {
            path: '/system/poster/devise',
            component: './system/poster/devise',
          },
          {
            path: '/system/permission/index',
            component: './system/permission/index',
          },
          {
            path: '/system/messages',
            component: './messages/index',
          },
          {
            path: '/system/sys/prenter',
            component: './system/sys/prenter',
          },

        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/goods',
    layout: true,
    routes: [
      {
        path: '/goods',
        routes: [
          {
            path: '/goods/index',
            component: './goods/index',
          },
          {
            path: '/goods/category',
            component: './goods/category',
          },
          {
            path: '/goods/add',
            component: './goods/addGoods',
          },
          {
            path: '/goods/show',
            component: './goods/showGoods',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/users',
    layout: true,
    routes: [
      {
        path: '/users',
        routes: [
          {
            path: '/users/index',
            component: './users/index',
          },
          {
            path: '/users/tree',
            component: './users/tree',
          },
          {
            path: '/users/detailed',
            component: './users/detailed',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/agents',
    layout: true,
    routes: [
      {
        path: '/agents',
        routes: [
          {
            path: '/agents/index',
            component: './agents/index',
          },
          {
            path: '/agents/invitation',
            component: './agents/invitation',
          },
          {
            path: '/agents/users',
            component: './agents/users',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/video',
    layout: true,
    routes: [
      {
        path: '/video/index',
        component: './video/Index',
      },
      {
        path: '/video/show',
        component: './video/show',
      },
      {
        path: '/video/category',
        component: './video/category',
      },
    ]
  },
  {
    path: '/order',
    layout: true,
    routes: [
      {
        path: '/order',
        routes: [
          {
            path: '/order/cloud',
            component: './order/cloud',
            query: {
              type: 1,
            },
          },
          {
            path: '/order/index',
            component: './order/cloud',
            query: {
              type: 0,
            },
          },
          {
            path: '/order/consigner',
            component: './order/consigner',
            query: {
              type: 0,
            },
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/integral',
    layout: true,
    routes: [
      {
        path: '/integral',
        routes: [
          {
            path: '/integral/log',
            component: './integral/log',
          },
          {
            path: '/integral/index',
            component: './integral/index',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/cloud',
    layout: true,
    routes: [
      {
        path: '/cloud',
        routes: [
          {
            path: '/cloud/goods',
            component: './cloud/goods',
          },
          {
            path: '/cloud/order',
            component: './order/cloud',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/coupon',
    layout: true,
    routes: [
      {
        path: '/coupon',
        routes: [
          {
            path: '/coupon/index',
            component: './coupon/index',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/finance',
    layout: true,
    routes: [
      {
        path: '/finance',
        routes: [
          {
            path: '/finance/index',
            component: './finance/index',
          },
          {
            path: '/finance/log',
            component: './finance/log',
          },
          {
            path: '/finance/withdrawal',
            component: './finance/withdrawal',
          },
          {
            path: '/finance/withdrawalshow',
            component: './finance/withshow',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/front',
    layout: true,
    routes: [
      {
        path: 'advertisingManagement',
        routes: [
          {
            path: 'index',
            component: './front/advertising/index',
          },
        ],
      },
      {
        path: 'navigation',
        routes: [
          {
            path: 'index',
            component: './front/navigation/index',
          },
        ],
      },
      {
        path: 'category',
        routes: [
          {
            path: 'index',
            component: './front/category/index',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/banks',
    layout: true,
    routes: [
      {
        path: '/banks',
        routes: [
          {
            path: 'index',
            component: './banks/index',
          },
        ],
      },
    ],
  },
  {
    path: '/taocan',
    layout: true,
    routes: [
      {
        path: '/taocan',
        routes: [
          {
            path: 'index',
            component: './taocan/index',
          },
        ],
      },
    ],
  },
  {
    path: '/driving',
    layout: true,
    routes: [
      {
        path: '/driving',
        routes: [
          {
            path: '/driving/language',
            component: './driving/Language',
          },
          {
            path: '/driving/category',
            component: './driving/Category',
          },
          {
            path: '/driving/question/bank',
            component: './driving/question/Bank',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },

  {
    name: '分析页',
    icon: 'smile',
    path: '/welcome',
    component: './Welcome',
  },
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        path: '/admin/sub-page',
        name: '二级管理页',
        icon: 'smile',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: '查询表格',
    icon: 'table',
    path: '/list',
    component: './TableList',
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];
